﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="web.beispiele.login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Login-Site</title>
    <link rel="stylesheet" type="text/css" href="../style/scripte/spacss.css" />
    <link rel="stylesheet" type="text/css" href="../style/scripte/menu1css.css" />
    <link rel="stylesheet" type="text/css" href="../style/scripte/content.css" />
    <link rel="shortcut icon" href="../style/pictures/logo/iconlogo.png" />
    <style type="text/css">
        .style3
        {
            text-align: center;
            width: 799px;
            height: 101px;
        }
        .style4
        {
            width: 100%;
            height: 75px;
        }
        #form1
        {
            text-align: center;
        }
    </style>

    <script language="JavaScript" type="text/javascript">
        function checkCapsLock(e) {
            var myKeyCode = 0;
            var myShiftKey = false;
            var myMsg = 'Caps Lock is On.\n\nTo prevent entering your password incorrectly,\nyou should press Caps Lock to turn it off.';

            if (document.all) {
                myKeyCode = e.keyCode;
                myShiftKey = e.shiftKey;

            } else if (document.layers) {
                myKeyCode = e.which;
                myShiftKey = (myKeyCode == 16) ? true : false;

            } else if (document.getElementById) {
                myKeyCode = e.which;
                myShiftKey = (myKeyCode == 16) ? true : false;
            }
            // Upper case letters are seen without depressing the Shift key, therefore Caps Lock is on
            if ((myKeyCode >= 65 && myKeyCode <= 90) && !myShiftKey) {
                alert(myMsg);
            // Lower case letters are seen while depressing the Shift key, therefore Caps Lock is on
            } else if ((myKeyCode >= 97 && myKeyCode <= 122) && myShiftKey) {
                alert(myMsg);
            }
        }
    </script>

</head>
<body>
    <div id="backgroundbody">
        <div id="templatecontent">
            <div id="content_top">
                <div id="menu_o_bg">
                </div>
                <div id="menu_u_bg">
                </div>
                <div id="content_body">
                    <div id="content_bottom">
                    </div>
                </div>
            </div>
            <div id="content_border">
                <div id="menu_o">
                    <!-- Menu_1 Roll_over and drop_down -->
                    <ul id="Navigation">
                        <li><a href=""></a></li>
                        <li><a href=""></a></li>
                        <li><a href="login.aspx">Home</a></li>
                        <li><a href="help.aspx">Help</a></li>
                        <li><a href="impressum.aspx">Impressum</a></li>
                    </ul>
                    <!-- Menu_1 Ende!! -->
                </div>
                <!-- Contentbereich!! -->
                <div id="hellocontent">
                    <p style="font-weight: 700; font-size: large">
                        Welcome, please login!</p>
                </div>
                <div id="editcontent">
                    <form id="form1" runat="server">
                    <div class="style3">
                        <asp:ObjectDataSource ID="odsUsers" runat="server" SelectMethod="getAllUsers" TypeName="bll.clsUserCollection">
                        </asp:ObjectDataSource>
                        <table class="style4">
                            <tr>
                                <td>
                                    Name:
                                </td>
                                <td>
                                    Password:
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:DropDownList ID="LoginNameDropDown" runat="server" DataSourceID="odsUsers" DataTextField="Name"
                                        DataValueField="Name" Height="24px" OnSelectedIndexChanged="LoginNameDropDown_SelectedIndexChanged"
                                        Width="220px">
                                    </asp:DropDownList>
                                </td>
                                <td onkeypress="checkCapsLock( event )">
                                    <asp:TextBox ID="LoginPW" runat="server" TextMode="Password" Width="227px" ToolTip="Please enter your password to login"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:Button ID="Button1" runat="server" Text="Login..." OnClick="btnCompare_Click"
                                        Style="text-align: center" Width="160px" />
                                </td>
                            </tr>
                        </table>
                        <br />
                        <br />
                        <br />
                        <br />
                        &nbsp;<br />
                        <br />
                        <br />
                    </div>
                    <br />
                    <asp:Label ID="LoginFailedMsg" runat="server" ForeColor="Red"></asp:Label>
                    <br />
                    &nbsp;<div class="style3">
                        <img src="../style/pictures/logo/help.png" alt="logo" style="text-align: center" /></div>
                    </form>
                </div>
                <!-- Contentbereich Ende!! -->
                <div id="logo">
                </div>
                <div id="menu_u">
                    <!-- Menu_2 Roll_over -->
                    <!--       <ul id="Navigation2">
                <li><a href="">Techniken</a></li>
                <li><a href="">Verzeichnis</a></li>
                <li><a href="">Impressum</a></li>
            </ul> -->
                    <!-- Menu_2 end!! -->
                </div>
            </div>
        </div>
    </div>
</body>
</html>
